//
//  BBQPitSearchViewController.h
//  bbqpitbooking
//
//  Created by Yin Ni Tun on 5/21/11.
//  Copyright 2011 iss. All rights reserved.
//

#import <UIKit/UIKit.h>
@class ParkDetailView,ParkAreaDetailView,ParkArea;
@class JSONRPCService;

@interface BBQPitSearchViewController : UIViewController<UIPickerViewDelegate, UIPickerViewDataSource, UIActionSheetDelegate, UISearchBarDelegate> {
	IBOutlet UIButton *btnDate;
	IBOutlet UIButton *btnPark;
	IBOutlet UIButton *btnParkArea;
	IBOutlet UIButton *btnParkMap;
	IBOutlet UIButton *btnParkAreaMap;
	IBOutlet UIButton *btnPastBooking;
	
	IBOutlet UITextField *txtDate;
	IBOutlet UITextField *txtPark;
	IBOutlet UITextField *txtParkArea;
	
	UIActionSheet *parkActionSheet;
	UIPickerView *parkView;
	UIActionSheet *parkAreaActionSheet;
	UIPickerView *parkAreaView;
	
	UIToolbar *pickerToolbar;
	
	ParkDetailView *parkdetailview;
	ParkAreaDetailView *parkareadetailview;
	
	NSString *bookingDate;
	JSONRPCService *webSVC;
	
	NSMutableArray *parkList;
	NSMutableArray *parkNames;
	
	NSMutableArray *parkAreaNames;	
	ParkArea *selectedLocation;
	NSString *areaCode;
}
@property (nonatomic, retain) IBOutlet UITextField *txtDate;
@property (nonatomic, retain) IBOutlet UITextField *txtPark;
@property (nonatomic, retain) IBOutlet UITextField *txtParkArea;
@property (nonatomic, retain) IBOutlet UIButton *btnDate;
@property (nonatomic, retain) IBOutlet UIButton *btnPark;
@property (nonatomic, retain) IBOutlet UIButton *btnParkArea;
@property (nonatomic, retain) IBOutlet UIButton *btnParkMap;
@property (nonatomic, retain) IBOutlet UIButton *btnParkAreaMap;
@property (nonatomic, retain) UIPickerView *parkView;
@property (nonatomic, retain) UIPickerView *parkAreaView;
@property (nonatomic, retain) UIActionSheet *parkAreaActionSheet;
@property (nonatomic, retain) UIActionSheet *parkActionSheet;

@property (nonatomic, retain) IBOutlet UIButton *btnPastBooking;

@property (nonatomic,retain) NSString *bookingDate;
@property (nonatomic,retain) JSONRPCService *webSVC;
@property (nonatomic,retain) NSMutableArray *parkList;
@property (nonatomic,retain) NSMutableArray *parkNames;
@property (nonatomic,retain) NSMutableArray *parkAreaNames;
@property (nonatomic,retain) ParkArea *selectedLocation;
@property (nonatomic,retain) NSString *areaCode;;


-(IBAction) Search;
-(IBAction) FindPastBooking;

-(void) dateButtonClick:(id)sender;
-(void) parkButtonClick:(id)sender;
-(void) parkDoneButtonClick:(id)sender;
-(void) parkAreaButtonClick:(id)sender;
-(void) parkAreaDoneButtonClick:(id)sender;
-(void) parkMapButtonClick:(id)sender;
-(void) parkAreaMapButtonClick:(id)sender;
-(BOOL) checkSelection:(NSString *) ParkText andDate:(NSString *) DateText andArea:(NSString *) AreaText;

@end
